<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libschc: picocoap.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libschc
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">picocoap.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stddef.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &quot;<a class="el" href="picocoap_8h_source.html">picocoap.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="schc_8h_source.html">schc.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:acbfc392c98f18ba088cacabd5cc82ce0"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#acbfc392c98f18ba088cacabd5cc82ce0">pcoap_get_coap_offset</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu)</td></tr>
<tr class="memdesc:acbfc392c98f18ba088cacabd5cc82ce0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the length of the CoAP header.  <a href="picocoap_8c.html#acbfc392c98f18ba088cacabd5cc82ce0">More...</a><br /></td></tr>
<tr class="separator:acbfc392c98f18ba088cacabd5cc82ce0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafb365b66f2b8cd7fc93b6b83dce56fa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#aafb365b66f2b8cd7fc93b6b83dce56fa">pcoap_validate_pkt</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu)</td></tr>
<tr class="memdesc:aafb365b66f2b8cd7fc93b6b83dce56fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Validate Packet.  <a href="picocoap_8c.html#aafb365b66f2b8cd7fc93b6b83dce56fa">More...</a><br /></td></tr>
<tr class="separator:aafb365b66f2b8cd7fc93b6b83dce56fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d1aa7c8f685736b6f58cb09f40bdd3c"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#a9d1aa7c8f685736b6f58cb09f40bdd3c">pcoap_get_token</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu, uint8_t *ptr)</td></tr>
<tr class="memdesc:a9d1aa7c8f685736b6f58cb09f40bdd3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get Message Token.  <a href="picocoap_8c.html#a9d1aa7c8f685736b6f58cb09f40bdd3c">More...</a><br /></td></tr>
<tr class="separator:a9d1aa7c8f685736b6f58cb09f40bdd3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a859e8eba609867e6e2c0b6ff2a969d38"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structpcoap__option.html">pcoap_option</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#a859e8eba609867e6e2c0b6ff2a969d38">pcoap_get_option</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu, <a class="el" href="structpcoap__option.html">pcoap_option</a> *last)</td></tr>
<tr class="memdesc:a859e8eba609867e6e2c0b6ff2a969d38"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get Option.  <a href="picocoap_8c.html#a859e8eba609867e6e2c0b6ff2a969d38">More...</a><br /></td></tr>
<tr class="separator:a859e8eba609867e6e2c0b6ff2a969d38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28b0035cf1fab512f4a990059e78501b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structpcoap__option.html">pcoap_option</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#a28b0035cf1fab512f4a990059e78501b">pcoap_get_option_by_num</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu, <a class="el" href="picocoap_8h.html#a07242620cf4343b2a2b3b9e085c8bfc5">pcoap_option_number</a> num, uint8_t occ)</td></tr>
<tr class="memdesc:a28b0035cf1fab512f4a990059e78501b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get Option by Option Number.  <a href="picocoap_8c.html#a28b0035cf1fab512f4a990059e78501b">More...</a><br /></td></tr>
<tr class="separator:a28b0035cf1fab512f4a990059e78501b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8aad0dae8087fa65cd0f77951ccf6fe0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#a8aad0dae8087fa65cd0f77951ccf6fe0">pcoap_decode_option</a> (uint8_t *pkt_ptr, size_t pkt_len, uint16_t *option_number, size_t *option_length, uint8_t **value)</td></tr>
<tr class="memdesc:a8aad0dae8087fa65cd0f77951ccf6fe0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal Method.  <a href="picocoap_8c.html#a8aad0dae8087fa65cd0f77951ccf6fe0">More...</a><br /></td></tr>
<tr class="separator:a8aad0dae8087fa65cd0f77951ccf6fe0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af576d82c1b5c6b38db85c4b38691fc87"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structpcoap__payload.html">pcoap_payload</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#af576d82c1b5c6b38db85c4b38691fc87">pcoap_get_payload</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu)</td></tr>
<tr class="memdesc:af576d82c1b5c6b38db85c4b38691fc87"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get Option.  <a href="picocoap_8c.html#af576d82c1b5c6b38db85c4b38691fc87">More...</a><br /></td></tr>
<tr class="separator:af576d82c1b5c6b38db85c4b38691fc87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a498bfe6e2730cb5018c43e1c84ece8b8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#a498bfe6e2730cb5018c43e1c84ece8b8">pcoap_init_pdu</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu)</td></tr>
<tr class="memdesc:a498bfe6e2730cb5018c43e1c84ece8b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Packet.  <a href="picocoap_8c.html#a498bfe6e2730cb5018c43e1c84ece8b8">More...</a><br /></td></tr>
<tr class="separator:a498bfe6e2730cb5018c43e1c84ece8b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e568b4f75937495e103d3e0c4a562e2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#a3e568b4f75937495e103d3e0c4a562e2">pcoap_set_version</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu, <a class="el" href="picocoap_8h.html#aa85087040a9a41e7c24d8ae00f24e02b">pcoap_version</a> ver)</td></tr>
<tr class="memdesc:a3e568b4f75937495e103d3e0c4a562e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set Version.  <a href="picocoap_8c.html#a3e568b4f75937495e103d3e0c4a562e2">More...</a><br /></td></tr>
<tr class="separator:a3e568b4f75937495e103d3e0c4a562e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6cd830e991279e45ed6bba30f66ff5fe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#a6cd830e991279e45ed6bba30f66ff5fe">pcoap_set_type</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu, <a class="el" href="picocoap_8h.html#ac67fe50885918b21eee276d621605942">pcoap_type</a> mtype)</td></tr>
<tr class="memdesc:a6cd830e991279e45ed6bba30f66ff5fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set Message Type.  <a href="picocoap_8c.html#a6cd830e991279e45ed6bba30f66ff5fe">More...</a><br /></td></tr>
<tr class="separator:a6cd830e991279e45ed6bba30f66ff5fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97706747324f6ab07b054ced91de43a5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#a97706747324f6ab07b054ced91de43a5">pcoap_set_code</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu, <a class="el" href="picocoap_8h.html#a38d6e34ee134b30dc8e0ff2645bdefc8">pcoap_code</a> code)</td></tr>
<tr class="memdesc:a97706747324f6ab07b054ced91de43a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set Message Code.  <a href="picocoap_8c.html#a97706747324f6ab07b054ced91de43a5">More...</a><br /></td></tr>
<tr class="separator:a97706747324f6ab07b054ced91de43a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b2807c0af83004f3144d8b295fec647"><td class="memItemLeft" align="right" valign="top"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#a8b2807c0af83004f3144d8b295fec647">pcoap_set_mid</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu, uint16_t mid)</td></tr>
<tr class="memdesc:a8b2807c0af83004f3144d8b295fec647"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set Message ID.  <a href="picocoap_8c.html#a8b2807c0af83004f3144d8b295fec647">More...</a><br /></td></tr>
<tr class="separator:a8b2807c0af83004f3144d8b295fec647"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b9a5b44c21a9764790c1a7f3168f5bc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#a5b9a5b44c21a9764790c1a7f3168f5bc">pcoap_set_token</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu, uint8_t *token, uint8_t tkl)</td></tr>
<tr class="memdesc:a5b9a5b44c21a9764790c1a7f3168f5bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set Message Token.  <a href="picocoap_8c.html#a5b9a5b44c21a9764790c1a7f3168f5bc">More...</a><br /></td></tr>
<tr class="separator:a5b9a5b44c21a9764790c1a7f3168f5bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a539c085f5cd8660309b9248fe2224c9c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#a539c085f5cd8660309b9248fe2224c9c">pcoap_add_option</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu, int32_t opt_num, uint8_t *value, uint16_t opt_len)</td></tr>
<tr class="memdesc:a539c085f5cd8660309b9248fe2224c9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add Message Option.  <a href="picocoap_8c.html#a539c085f5cd8660309b9248fe2224c9c">More...</a><br /></td></tr>
<tr class="separator:a539c085f5cd8660309b9248fe2224c9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a314a687de17c9e5c0325e2842d4899dc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#a314a687de17c9e5c0325e2842d4899dc">pcoap_set_payload</a> (<a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *pdu, uint8_t *payload, size_t payload_len)</td></tr>
<tr class="memdesc:a314a687de17c9e5c0325e2842d4899dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add Message Option.  <a href="picocoap_8c.html#a314a687de17c9e5c0325e2842d4899dc">More...</a><br /></td></tr>
<tr class="separator:a314a687de17c9e5c0325e2842d4899dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3fd3d8aafe1d09a4a17ae97c44e2548"><td class="memItemLeft" align="right" valign="top"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#af3fd3d8aafe1d09a4a17ae97c44e2548">pcoap_adjust_option_deltas</a> (uint8_t *opts_start, size_t *opts_len, size_t max_len, int32_t offset)</td></tr>
<tr class="memdesc:af3fd3d8aafe1d09a4a17ae97c44e2548"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal Method.  <a href="picocoap_8c.html#af3fd3d8aafe1d09a4a17ae97c44e2548">More...</a><br /></td></tr>
<tr class="separator:af3fd3d8aafe1d09a4a17ae97c44e2548"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ed0e923c8bde1711a858f6a95d6211d"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#a6ed0e923c8bde1711a858f6a95d6211d">pcoap_build_option_header</a> (uint8_t *buf, size_t max_len, int32_t opt_delta, int32_t opt_len)</td></tr>
<tr class="memdesc:a6ed0e923c8bde1711a858f6a95d6211d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal Method.  <a href="picocoap_8c.html#a6ed0e923c8bde1711a858f6a95d6211d">More...</a><br /></td></tr>
<tr class="separator:a6ed0e923c8bde1711a858f6a95d6211d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae623c60b0b9c8e994b3fd7687eee0147"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="picocoap_8c.html#ae623c60b0b9c8e994b3fd7687eee0147">pcoap_compute_option_header_len</a> (int32_t opt_delta, int32_t opt_len)</td></tr>
<tr class="memdesc:ae623c60b0b9c8e994b3fd7687eee0147"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal Method.  <a href="picocoap_8c.html#ae623c60b0b9c8e994b3fd7687eee0147">More...</a><br /></td></tr>
<tr class="separator:ae623c60b0b9c8e994b3fd7687eee0147"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a539c085f5cd8660309b9248fe2224c9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a539c085f5cd8660309b9248fe2224c9c">&#9670;&nbsp;</a></span>pcoap_add_option()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a> pcoap_add_option </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>opt_num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>opt_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add Message Option. </p>
<p>Adds an option to the existing message. Options SHOULD be added in order of option number. In the case of multiple options of the same type, they are sorted in the order that they are added. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pdu</td><td>pointer to the coap message struct. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">opt</td><td>option container. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>coap_error (0 == no error) </dd></dl>

</div>
</div>
<a id="af3fd3d8aafe1d09a4a17ae97c44e2548"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af3fd3d8aafe1d09a4a17ae97c44e2548">&#9670;&nbsp;</a></span>pcoap_adjust_option_deltas()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a> pcoap_adjust_option_deltas </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>opts_start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>opts_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>max_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Internal Method. </p>

</div>
</div>
<a id="a6ed0e923c8bde1711a858f6a95d6211d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ed0e923c8bde1711a858f6a95d6211d">&#9670;&nbsp;</a></span>pcoap_build_option_header()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int8_t pcoap_build_option_header </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>max_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>opt_delta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>opt_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Internal Method. </p>

</div>
</div>
<a id="ae623c60b0b9c8e994b3fd7687eee0147"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae623c60b0b9c8e994b3fd7687eee0147">&#9670;&nbsp;</a></span>pcoap_compute_option_header_len()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int8_t pcoap_compute_option_header_len </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>opt_delta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>opt_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Internal Method. </p>

</div>
</div>
<a id="a8aad0dae8087fa65cd0f77951ccf6fe0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8aad0dae8087fa65cd0f77951ccf6fe0">&#9670;&nbsp;</a></span>pcoap_decode_option()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a> pcoap_decode_option </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>pkt_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>pkt_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>option_number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>option_length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t **&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Internal Method. </p>

</div>
</div>
<a id="acbfc392c98f18ba088cacabd5cc82ce0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbfc392c98f18ba088cacabd5cc82ce0">&#9670;&nbsp;</a></span>pcoap_get_coap_offset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t pcoap_get_coap_offset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds the length of the CoAP header. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pdu</td><td>the CoAP pdu, containing the header and payload</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the length of the CoAP header </dd></dl>

</div>
</div>
<a id="a859e8eba609867e6e2c0b6ff2a969d38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a859e8eba609867e6e2c0b6ff2a969d38">&#9670;&nbsp;</a></span>pcoap_get_option()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structpcoap__option.html">pcoap_option</a> pcoap_get_option </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structpcoap__option.html">pcoap_option</a> *&#160;</td>
          <td class="paramname"><em>last</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get Option. </p>
<p>Iterates over the options in the given message. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pdu</td><td>pointer to the coap message struct. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pointer</td><td>to the last/next option, pass 0 for the first option. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>coap_option </dd></dl>

</div>
</div>
<a id="a28b0035cf1fab512f4a990059e78501b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28b0035cf1fab512f4a990059e78501b">&#9670;&nbsp;</a></span>pcoap_get_option_by_num()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structpcoap__option.html">pcoap_option</a> pcoap_get_option_by_num </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="picocoap_8h.html#a07242620cf4343b2a2b3b9e085c8bfc5">pcoap_option_number</a>&#160;</td>
          <td class="paramname"><em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>occ</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get Option by Option Number. </p>
<p>Gets a single specified by the option number and index of which occurrence of that option number you'd like. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pdu</td><td>pointer to the coap message struct. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num</td><td>option number to get. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">occ</td><td>occurrence of to get (0th, 1st, 2nd, etc) 0 for the first option. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>coap_option </dd></dl>

</div>
</div>
<a id="af576d82c1b5c6b38db85c4b38691fc87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af576d82c1b5c6b38db85c4b38691fc87">&#9670;&nbsp;</a></span>pcoap_get_payload()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structpcoap__payload.html">pcoap_payload</a> pcoap_get_payload </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get Option. </p>
<p>Extracts the option with the given index in the given message. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pdu</td><td>pointer to the coap message struct. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>coap_payload </dd></dl>

</div>
</div>
<a id="a9d1aa7c8f685736b6f58cb09f40bdd3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d1aa7c8f685736b6f58cb09f40bdd3c">&#9670;&nbsp;</a></span>pcoap_get_token()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t pcoap_get_token </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>ptr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get Message Token. </p>
<p>Extracts the token from the given message. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pdu</td><td>pointer to the coap message struct. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token. </dd></dl>

</div>
</div>
<a id="a498bfe6e2730cb5018c43e1c84ece8b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a498bfe6e2730cb5018c43e1c84ece8b8">&#9670;&nbsp;</a></span>pcoap_init_pdu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a> pcoap_init_pdu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Packet. </p>
<p>Initializes on an empty buffer for creating new CoAP packets. This function (or coap_validate for parsing packets) must be called and must return CE_NONE before you can use any of the getters or setter. The packet is initialized to a CoAP Ping. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pdu</td><td>pointer to the coap message struct. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>coap_error (0 == no error) </dd></dl>

</div>
</div>
<a id="a97706747324f6ab07b054ced91de43a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97706747324f6ab07b054ced91de43a5">&#9670;&nbsp;</a></span>pcoap_set_code()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a> pcoap_set_code </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="picocoap_8h.html#a38d6e34ee134b30dc8e0ff2645bdefc8">pcoap_code</a>&#160;</td>
          <td class="paramname"><em>code</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set Message Code. </p>
<p>Sets the message type header field. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pdu</td><td>pointer to the coap message struct. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">code</td><td>code to set. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>coap_error (0 == no error) </dd></dl>
<dl class="section see"><dt>See also</dt><dd>coap_code </dd></dl>

</div>
</div>
<a id="a8b2807c0af83004f3144d8b295fec647"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b2807c0af83004f3144d8b295fec647">&#9670;&nbsp;</a></span>pcoap_set_mid()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a> pcoap_set_mid </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>mid</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set Message ID. </p>
<p>Sets the message ID header field. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pdu</td><td>pointer to the coap message struct. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">mid</td><td>message ID to set. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>coap_error (0 == no error) </dd></dl>

</div>
</div>
<a id="a314a687de17c9e5c0325e2842d4899dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a314a687de17c9e5c0325e2842d4899dc">&#9670;&nbsp;</a></span>pcoap_set_payload()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a> pcoap_set_payload </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>payload</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>payload_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add Message Option. </p>
<p>Sets the payload of the given message to the value in <code>payload</code>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pdu</td><td>pointer to the coap message struct. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pl</td><td>payload container. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>coap_error (0 == no error) </dd></dl>

</div>
</div>
<a id="a5b9a5b44c21a9764790c1a7f3168f5bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b9a5b44c21a9764790c1a7f3168f5bc">&#9670;&nbsp;</a></span>pcoap_set_token()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a> pcoap_set_token </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>token</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>tkl</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set Message Token. </p>
<p>Sets the message token header field. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pdu</td><td>pointer to the coap message struct. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">token</td><td>pointer to the token array to set. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>coap_error (0 == no error) </dd></dl>

</div>
</div>
<a id="a6cd830e991279e45ed6bba30f66ff5fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6cd830e991279e45ed6bba30f66ff5fe">&#9670;&nbsp;</a></span>pcoap_set_type()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a> pcoap_set_type </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="picocoap_8h.html#ac67fe50885918b21eee276d621605942">pcoap_type</a>&#160;</td>
          <td class="paramname"><em>mtype</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set Message Type. </p>
<p>Sets the message type header field. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pdu</td><td>pointer to the coap message struct. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">mtype</td><td>type to set. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>coap_error (0 == no error) </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="picocoap_8h.html#a5022bbbae08abe01dc1e3363d01c9429" title="Message Types.">coap_type</a> </dd></dl>

</div>
</div>
<a id="a3e568b4f75937495e103d3e0c4a562e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e568b4f75937495e103d3e0c4a562e2">&#9670;&nbsp;</a></span>pcoap_set_version()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a> pcoap_set_version </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="picocoap_8h.html#aa85087040a9a41e7c24d8ae00f24e02b">pcoap_version</a>&#160;</td>
          <td class="paramname"><em>ver</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set Version. </p>
<p>Sets the version number header field. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pdu</td><td>pointer to the coap message struct. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ver</td><td>version to set. Must be COAP_V1. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>coap_error (0 == no error) </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="picocoap_8h.html#a68aad811c8ab03701a2c3f1b84debe74" title="Protocol Versions.">coap_version</a> </dd></dl>

</div>
</div>
<a id="aafb365b66f2b8cd7fc93b6b83dce56fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aafb365b66f2b8cd7fc93b6b83dce56fa">&#9670;&nbsp;</a></span>pcoap_validate_pkt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="picocoap_8h.html#a4ae82558a4b549c2ae73f851df0d6cb2">pcoap_error</a> pcoap_validate_pkt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcoap__pdu.html">pcoap_pdu</a> *&#160;</td>
          <td class="paramname"><em>pdu</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Validate Packet. </p>
<p>Parses the given packet to check if it is a valid CoAP message. This function (or coap_init_pdu for creating new packets) must be called and must return CE_NONE before you can use any of the getters or setter. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pdu</td><td>pointer to the coap message struct. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>error code (CE_NONE == 0 == no error). </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="picocoap_8h.html#aa9dd43046c8daad008c9195a6f84d4f1" title="Status Codes.">coap_error</a> </dd>
<dd>
coap_init_pdu </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
